package chapter10

/**
  * @Copyright: Shanghai Definesys Company.All rights reserved.
  * @Description:
  * @author: chuhaitao
  * @since: 2019/1/12 21:50
  * @history:
  *          1.2019/1/12 created by chuhaitao
  */
object ImplictDemo3 {


  def main(args: Array[String]): Unit = {
    //隐式类
    implicit class db(var mysql: Mysql) {
      def coon(): Unit = {
        print("1212")
      }
    }
    var mysql = new Mysql
    mysql.coon()//相当于 db（mysql）.coon()
  }
}

class Mysql {

}


